#ifndef __HELPER_HPP__
#define __HELPER_HPP__

template<class T, class Iterator>
class iterator
{
	Iterator _it;
public:
	typedef T                               value_type;
	typedef T*                              pointer;
	typedef T&                              reference;
	typedef size_t                          size_type;
	typedef ptrdiff_t                       difference_type;

	iterator(Iterator _in):_it(_in)
	{};
	iterator(const iterator<T,Iterator>& _in) : _it(_in._it) 
	{};
	iterator& operator=(const iterator<T,Iterator>& i)
	{
		if ( _it != i._it)
		{
			_it = i._it;
		}
		return (*this);
	};
	reference operator*() const
	{
		return (*_it);//((_it.operator *()) );
	};
	pointer operator->() const
	{
		return &(*_it);//( _it.operator ->() ); 
	};
	iterator<T,Iterator>& operator++()
	{
		++_it;
		return(*this);
	};
	iterator<T,Iterator>   operator++(int)
	{
		iterator<T,Iterator> tmp(*this);
		++(*this);
		return(tmp);
	};
	bool operator!=(const iterator<T,Iterator>& i)
	{
		return (_it != i._it ); 
	};
	bool operator==(const iterator<T,Iterator>& i)
	{
		return (_it == i._it ); 
	};		
	iterator& operator--()
	{
		--_it;
		return(*this);
	};
	iterator  operator--(int)
	{
		iterator<T,Iterator> tmp(*this);
		--(*this);
		return(tmp);
	};
/*	iterator  operator +  ( int n ) const;
	iterator& operator += ( int n );
	iterator  operator -  ( int n ) const;
	iterator& operator -= ( int n ); */
};

/*
template<class T>
class CompareBySysName : public std::unary_function<T, bool >
{
public:
	CompareBySysName(const wstring& n) : name(n) 
	{};
	CompareBySysName(const wchar_t* s) : name(s) 
	{};
	bool operator () (const T& obj) const
	{
		return obj->GetSysName() == name;
	};
private:
	wstring name;
};
*/

#endif